package sevensoft.创建型模式.工厂模式.简单工厂;

import sevensoft.创建型模式.工厂模式.简单工厂.guns.impl.Ak47;
import sevensoft.创建型模式.工厂模式.简单工厂.store.GunStore;
import sevensoft.创建型模式.工厂模式.简单工厂.guns.Gun;

import java.lang.reflect.InvocationTargetException;

public class Demo {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        GunStore gunStore = new GunStore();
        Gun gun = gunStore.orderGun(Ak47.class);
//        Gun gun = gunStore.orderGun(Mk18.class);
        System.out.println(gun.getName());
        System.out.println(gun);


    }
}
